<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>信息录入界面</title>
    <link rel="stylesheet" href="../css/ProjectResult.css">
    <script src="../js/jquery.js"></script>
    <script src="../js/ProjectResult.js"></script>
</head>
<body>
<!--操作界面-->
<div class="projectResultOper">
    <button id="projectResultAddBtn">录入新的结果</button>
    <select id="projectResultSelectBatch">
        <!--<option>选择查询的批次</option>-->
    </select>
    <button id="projectResultSelectBatchBtn">点击查询</button>
    <select id="projectResultSelectDeparment">
        <!--<option>选择查询的学院</option>-->
    </select>
    <button id="projectResultSelectDeparmentBtn">点击查询</button>
    <select id="projectResultSelectProject">
        <!--<option>选择查询的项目</option>-->
    </select>
    <button id="projectResultSelectProjectBtn">点击查询</button>
</div>
<hr/>
<!--历史信息显示-->
<div class="projectResultInformationShow">
    <table id="tb_projectResult" cellspacing="0" cellpadding="2" width="100%" border="1">
        <tr align="center" bgcolor="#dcdcdc">
            <td style="width:30px;"><input id="projectResultInformationShowFather" type="checkbox"></td>
            <td>批次名称</td>
            <td>学生姓名</td>
            <td>项目名称</td>
            <td>体检结果</td>
            <td>操作</td>
        </tr>
        <!--<tr>-->
            <!--<td style="width:30px;"><input class="projectResultInformationShowSon" type="checkbox"></td>-->
            <!--<td>第一批次</td>-->
            <!--<td>张三</td>-->
            <!--<td>身高</td>-->
            <!--<td>178</td>-->
            <!--<td>-->
                <!--<button class="projectResultInformationShowUpdateBtn" data-id="">编辑</button>-->
                <!--<button class="projectResultInformationShowCancelBtn" data-id="">删除</button>-->
            <!--</td>-->
        <!--</tr>-->
    </table>
</div>
<!--添加信息操作界面-->
<div class="projectResultAddNewResult">
    <label for="s1">体检批次</label>
    <select id="s1">
        <option>请选择体检批次</option>
    </select>
    <!--<select>-->
    <!--<option>请选择体检学院</option>-->
    <!--</select>-->
    <label for="s2">学生姓名</label>
    <select id="s2">
        <option>请选择学生</option>
    </select>
    <div class="projectResultAddNewResultInput">
        <!--<div>-->
        <!--<label></label>-->
        <!--<input type="text" placeholder="请输入体检结果">-->
        <!--</div>-->
    </div>
    <div class="projectResultAddNewResultBtn">
        <button id="projectResultAddNewResultSureBtn">确认</button>
        <button id="projectResultAddNewResultCancelBtn">取消</button>
    </div>
</div>
<!--编辑框界面显示-->
<div class="projectResultUpdate">
    <div>
        <label for="projectResultBatch">批次名称</label>
        <input type="text" class="projectResult" id="projectResultBatch" placeholder="" disabled="disabled">
    </div>
    <div>
        <label for="projectResultStudent">学生姓名</label>
        <input type="text" class="projectResult" id="projectResultStudent" placeholder="" disabled="disabled">
    </div>
    <div>
        <label for="projectResultProject">项目名称</label>
        <input type="text" class="projectResult" id="projectResultProject" placeholder="" disabled="disabled">
    </div>
    <div>
        <label for="projectResultProjectResult">项目结果</label>
        <input type="text" class="projectResult" id="projectResultProjectResult" placeholder="">
    </div>
    <div>
        <button id="projectResultclickUpdateGetInfoSureBtn">确认</button>
        <button id="projectResultclickUpdateGetInfoBackBtn">返回</button>
    </div>
</div>
<div id="over"></div>
<!--表格宽度可伸缩事件-->
<script type="text/javascript">
    var tTD; //用来存储当前更改宽度的Table Cell,避免快速移动鼠标的问题
    var table = document.getElementById("tb_projectResult");
    for (j = 0; j < table.rows[0].cells.length; j++) {
        table.rows[0].cells[j].onmousedown = function () {
//记录单元格
            tTD = this;
            if (event.offsetX > tTD.offsetWidth - 10) {
                tTD.mouseDown = true;
                tTD.oldX = event.x;
                tTD.oldWidth = tTD.offsetWidth;
            }
//记录Table宽度
//table = tTD; while (table.tagName != ‘TABLE') table = table.parentElement;
//tTD.tableWidth = table.offsetWidth;
        };
        table.rows[0].cells[j].onmouseup = function () {
//结束宽度调整
            if (tTD == undefined) tTD = this;
            tTD.mouseDown = false;
            tTD.style.cursor = 'default';
        };
        table.rows[0].cells[j].onmousemove = function () {
//更改鼠标样式
            if (event.offsetX > this.offsetWidth - 10)
                this.style.cursor = 'col-resize';
            else
                this.style.cursor = 'default';
//取出暂存的Table Cell
            if (tTD == undefined) tTD = this;
//调整宽度
            if (tTD.mouseDown != null && tTD.mouseDown == true) {
                tTD.style.cursor = 'default';
                if (tTD.oldWidth + (event.x - tTD.oldX) > 0)
                    tTD.width = tTD.oldWidth + (event.x - tTD.oldX);
//调整列宽
                tTD.style.width = tTD.width;
                tTD.style.cursor = 'col-resize';
//调整该列中的每个Cell
                table = tTD;
                while (table.tagName != 'TABLE') table = table.parentElement;
                for (j = 0; j < table.rows.length; j++) {
                    table.rows[j].cells[tTD.cellIndex].width = tTD.width;
                }
//调整整个表
//table.width = tTD.tableWidth + (tTD.offsetWidth – tTD.oldWidth);
//table.style.width = table.width;
            }
        };
    }
</script>
</body>
</html>